<div class="che-codemirror-editor">
  <ng-form name="codemirrorForm">
        <textarea ui-codemirror="cheEditorController.editorOptions"
                  aria-label="editor"
                  ng-model-options="{ updateOn: 'default blur', debounce: { 'default': 500, 'blur': 0 }, allowInvalid: true }"
                  ng-model="cheEditorController.editorContent"
                  name="editor"
                  required></textarea>
    <div ng-messages="codemirrorForm.editor.$error || !cheEditorController.isEditorValid()">
      <div ng-message="required">Editor's content is required.</div>
      <div ng-repeat="error in cheEditorController.editorState.errors">{{error}}</div>
    </div>
  </ng-form>
</div>
